using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._NetworkDiagramTools._Configuration
{
    /// <summary>
    /// <para>Add Diagram Feature Capability By Attribute Rule</para>
    /// <para>Adds a diagram rule to a diagram template to assign a particular capability on diagram features currently represented in the diagram. This capability is used by other rules executed later in the rule sequence. The diagram features that will be processed are queried from a network source class or object table by attributes.</para>
    /// <para>将逻辑示意图规则添加到逻辑示意图模板，以便为逻辑示意图中当前表示的逻辑示意图要素分配特定功能。此功能由稍后在规则序列中执行的其他规则使用。将按属性从网络源类或对象表中查询将要处理的逻辑示意图要素。</para>
    /// </summary>    
    [DisplayName("Add Diagram Feature Capability By Attribute Rule")]
    public class AddDiagramFeatureCapabilityByAttributeRule : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public AddDiagramFeatureCapabilityByAttributeRule()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_in_utility_network">
        /// <para>Input Network</para>
        /// <para>The utility network or trace network containing the diagram template to modify.</para>
        /// <para>包含要修改的逻辑示意图模板的公共设施网络或追踪网络。</para>
        /// </param>
        /// <param name="_template_name">
        /// <para>Input Diagram Template</para>
        /// <para>The name of the diagram template to modify.</para>
        /// <para>要修改的逻辑示意图模板的名称。</para>
        /// </param>
        /// <param name="_is_active">
        /// <para>Active</para>
        /// <para><xdoc>
        ///   <para>Specifies whether the rule will be active when generating and updating diagrams based on the specified template.
        ///   <bulletList>
        ///     <bullet_item>Checked—The added rule will become active during the generation and update of any diagrams based on the input template. This is the default.  </bullet_item><para/>
        ///     <bullet_item>Unchecked—The added rule will not become active during the generation or update of any diagrams based on the input template.  </bullet_item><para/>
        ///   </bulletList>
        ///   </para>
        /// </xdoc></para>
        /// <para><xdoc>
        /// <para>指定在基于指定模板生成和更新关系图时，规则是否处于活动状态。
        ///   <bulletList>
        ///     <bullet_item>选中 - 在基于输入模板生成和更新任何逻辑示意图期间，添加的规则将变为活动状态。这是默认设置。 </bullet_item><para/>
        ///     <bullet_item>未选中 - 在基于输入模板生成或更新任何逻辑示意图期间，添加的规则将不会变为活动状态。</bullet_item><para/>
        ///   </bulletList>
        ///   </para>
        /// </xdoc></para>
        /// </param>
        /// <param name="_network_source">
        /// <para>Network Source</para>
        /// <para>The network source class or object table that references the features or objects associated with the diagram features to which the particular capability will be assigned.</para>
        /// <para>网络源类或对象表，用于引用与将为其分配特定功能的逻辑示意图要素关联的要素或对象。</para>
        /// </param>
        /// <param name="_where_clause">
        /// <para>Expression</para>
        /// <para>An SQL expression used to filter out the features or objects of interest among the specified network source feature class or objet table. For more information on SQL syntax, see SQL reference for query expressions used in ArcGIS.</para>
        /// <para>一个 SQL 表达式，用于在指定的网络源要素类或对象表中筛选出感兴趣的要素或对象。有关 SQL 语法的详细信息，请参阅 ArcGIS 中使用的查询表达式的 SQL 参考。</para>
        /// </param>
        /// <param name="_capability">
        /// <para>Capability</para>
        /// <para><xdoc>
        ///   <para>Specifies the capability that will be assigned to the queried diagram features at the end of the rule execution. This capability will be used by other rules executed later in the rule sequence.</para>
        ///   <bulletList>
        ///     <bullet_item>Prevent related container from collapse— All queried features will be flagged to prevent their related container from being collapsed by Collapse Container rules executed later in the rule sequence. This is the default.</bullet_item><para/>
        ///     <bullet_item>Allow related container to collapse— All queried features will be flagged to allow their related container to be collapsed by Collapse Container rules executed later in the rule sequence.</bullet_item><para/>
        ///     <bullet_item>Prevent reduce junction— All queried junctions will be flagged to prevent Reduce Junction rules executed later in the rule sequence to reduce them.</bullet_item><para/>
        ///     <bullet_item>Allow reduce junction— All queried junctions will be flagged to allow Reduce Junction rules executed later in the rule sequence to reduce them.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定在规则执行结束时将分配给查询逻辑示意图要素的功能。此功能将由稍后在规则序列中执行的其他规则使用。</para>
        ///   <bulletList>
        ///     <bullet_item>防止相关容器折叠 - 将标记所有查询的要素，以防止其相关容器被规则序列中稍后执行的折叠容器规则折叠。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>允许相关容器折叠 - 所有查询的要素都将被标记，以允许其相关容器被规则序列中稍后执行的折叠容器规则折叠。</bullet_item><para/>
        ///     <bullet_item>防止减少交汇点 - 将标记所有查询的交汇点，以防止稍后在规则序列中执行减少交汇点规则以减少它们。</bullet_item><para/>
        ///     <bullet_item>允许减少交汇点 - 所有查询的交汇点都将被标记，以允许稍后在规则序列中执行的减少交汇点规则来减少它们。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// </param>
        public AddDiagramFeatureCapabilityByAttributeRule(object _in_utility_network, object _template_name, _is_active_value _is_active, object _network_source, object _where_clause, _capability_value _capability)
        {
            this._in_utility_network = _in_utility_network;
            this._template_name = _template_name;
            this._is_active = _is_active;
            this._network_source = _network_source;
            this._where_clause = _where_clause;
            this._capability = _capability;
        }
        public override string ToolboxName => "Network Diagram Tools";

        public override string ToolName => "Add Diagram Feature Capability By Attribute Rule";

        public override string CallName => "nd.AddDiagramFeatureCapabilityByAttributeRule";

        public override List<string> AcceptEnvironments => [];

        public override object[] ParameterInfo => [_in_utility_network, _template_name, _is_active.GetGPValue(), _network_source, _where_clause, _capability.GetGPValue(), _description, _out_utility_network, _out_template_name];

        /// <summary>
        /// <para>Input Network</para>
        /// <para>The utility network or trace network containing the diagram template to modify.</para>
        /// <para>包含要修改的逻辑示意图模板的公共设施网络或追踪网络。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Network")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_utility_network { get; set; }


        /// <summary>
        /// <para>Input Diagram Template</para>
        /// <para>The name of the diagram template to modify.</para>
        /// <para>要修改的逻辑示意图模板的名称。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Diagram Template")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _template_name { get; set; }


        /// <summary>
        /// <para>Active</para>
        /// <para><xdoc>
        ///   <para>Specifies whether the rule will be active when generating and updating diagrams based on the specified template.
        ///   <bulletList>
        ///     <bullet_item>Checked—The added rule will become active during the generation and update of any diagrams based on the input template. This is the default.  </bullet_item><para/>
        ///     <bullet_item>Unchecked—The added rule will not become active during the generation or update of any diagrams based on the input template.  </bullet_item><para/>
        ///   </bulletList>
        ///   </para>
        /// </xdoc></para>
        /// <para><xdoc>
        /// <para>指定在基于指定模板生成和更新关系图时，规则是否处于活动状态。
        ///   <bulletList>
        ///     <bullet_item>选中 - 在基于输入模板生成和更新任何逻辑示意图期间，添加的规则将变为活动状态。这是默认设置。 </bullet_item><para/>
        ///     <bullet_item>未选中 - 在基于输入模板生成或更新任何逻辑示意图期间，添加的规则将不会变为活动状态。</bullet_item><para/>
        ///   </bulletList>
        ///   </para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Active")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public _is_active_value _is_active { get; set; }

        public enum _is_active_value
        {
            /// <summary>
            /// <para>ACTIVE</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("ACTIVE")]
            [GPEnumValue("true")]
            _true,

            /// <summary>
            /// <para>INACTIVE</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("INACTIVE")]
            [GPEnumValue("false")]
            _false,

        }

        /// <summary>
        /// <para>Network Source</para>
        /// <para>The network source class or object table that references the features or objects associated with the diagram features to which the particular capability will be assigned.</para>
        /// <para>网络源类或对象表，用于引用与将为其分配特定功能的逻辑示意图要素关联的要素或对象。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Network Source")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _network_source { get; set; }


        /// <summary>
        /// <para>Expression</para>
        /// <para>An SQL expression used to filter out the features or objects of interest among the specified network source feature class or objet table. For more information on SQL syntax, see SQL reference for query expressions used in ArcGIS.</para>
        /// <para>一个 SQL 表达式，用于在指定的网络源要素类或对象表中筛选出感兴趣的要素或对象。有关 SQL 语法的详细信息，请参阅 ArcGIS 中使用的查询表达式的 SQL 参考。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Expression")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _where_clause { get; set; }


        /// <summary>
        /// <para>Capability</para>
        /// <para><xdoc>
        ///   <para>Specifies the capability that will be assigned to the queried diagram features at the end of the rule execution. This capability will be used by other rules executed later in the rule sequence.</para>
        ///   <bulletList>
        ///     <bullet_item>Prevent related container from collapse— All queried features will be flagged to prevent their related container from being collapsed by Collapse Container rules executed later in the rule sequence. This is the default.</bullet_item><para/>
        ///     <bullet_item>Allow related container to collapse— All queried features will be flagged to allow their related container to be collapsed by Collapse Container rules executed later in the rule sequence.</bullet_item><para/>
        ///     <bullet_item>Prevent reduce junction— All queried junctions will be flagged to prevent Reduce Junction rules executed later in the rule sequence to reduce them.</bullet_item><para/>
        ///     <bullet_item>Allow reduce junction— All queried junctions will be flagged to allow Reduce Junction rules executed later in the rule sequence to reduce them.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定在规则执行结束时将分配给查询逻辑示意图要素的功能。此功能将由稍后在规则序列中执行的其他规则使用。</para>
        ///   <bulletList>
        ///     <bullet_item>防止相关容器折叠 - 将标记所有查询的要素，以防止其相关容器被规则序列中稍后执行的折叠容器规则折叠。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>允许相关容器折叠 - 所有查询的要素都将被标记，以允许其相关容器被规则序列中稍后执行的折叠容器规则折叠。</bullet_item><para/>
        ///     <bullet_item>防止减少交汇点 - 将标记所有查询的交汇点，以防止稍后在规则序列中执行减少交汇点规则以减少它们。</bullet_item><para/>
        ///     <bullet_item>允许减少交汇点 - 所有查询的交汇点都将被标记，以允许稍后在规则序列中执行的减少交汇点规则来减少它们。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Capability")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public _capability_value _capability { get; set; }

        public enum _capability_value
        {
            /// <summary>
            /// <para>Allow related container to collapse</para>
            /// <para>Allow related container to collapse— All queried features will be flagged to allow their related container to be collapsed by Collapse Container rules executed later in the rule sequence.</para>
            /// <para>允许相关容器折叠 - 所有查询的要素都将被标记，以允许其相关容器被规则序列中稍后执行的折叠容器规则折叠。</para>
            /// </summary>
            [Description("Allow related container to collapse")]
            [GPEnumValue("ALLOW_TO_COLLAPSE_CONTAINER")]
            _ALLOW_TO_COLLAPSE_CONTAINER,

            /// <summary>
            /// <para>Prevent related container from collapse</para>
            /// <para>Prevent related container from collapse— All queried features will be flagged to prevent their related container from being collapsed by Collapse Container rules executed later in the rule sequence. This is the default.</para>
            /// <para>防止相关容器折叠 - 将标记所有查询的要素，以防止其相关容器被规则序列中稍后执行的折叠容器规则折叠。这是默认设置。</para>
            /// </summary>
            [Description("Prevent related container from collapse")]
            [GPEnumValue("PREVENT_TO_COLLAPSE_CONTAINER")]
            _PREVENT_TO_COLLAPSE_CONTAINER,

            /// <summary>
            /// <para>Allow reduce junction</para>
            /// <para>Allow reduce junction— All queried junctions will be flagged to allow Reduce Junction rules executed later in the rule sequence to reduce them.</para>
            /// <para>允许减少交汇点 - 所有查询的交汇点都将被标记，以允许稍后在规则序列中执行的减少交汇点规则来减少它们。</para>
            /// </summary>
            [Description("Allow reduce junction")]
            [GPEnumValue("ALLOW_TO_REDUCE_JUNCTION")]
            _ALLOW_TO_REDUCE_JUNCTION,

            /// <summary>
            /// <para>Prevent reduce junction</para>
            /// <para>Prevent reduce junction— All queried junctions will be flagged to prevent Reduce Junction rules executed later in the rule sequence to reduce them.</para>
            /// <para>防止减少交汇点 - 将标记所有查询的交汇点，以防止稍后在规则序列中执行减少交汇点规则以减少它们。</para>
            /// </summary>
            [Description("Prevent reduce junction")]
            [GPEnumValue("PREVENT_TO_REDUCE_JUNCTION")]
            _PREVENT_TO_REDUCE_JUNCTION,

        }

        /// <summary>
        /// <para>Description</para>
        /// <para>The description of the rule.</para>
        /// <para>规则的说明。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Description")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _description { get; set; } = null;


        /// <summary>
        /// <para>Output Network</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Network")]
        [Description("")]
        [Option(OptionTypeEnum.derived)]
        public object _out_utility_network { get; set; }


        /// <summary>
        /// <para>Output Diagram Template</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Diagram Template")]
        [Description("")]
        [Option(OptionTypeEnum.derived)]
        public object _out_template_name { get; set; }


        public AddDiagramFeatureCapabilityByAttributeRule SetEnv()
        {
            base.SetEnv();
            return this;
        }

    }

}